export function addCookie(key,value,day){	
	var date=new Date();
	date.setDate(date.getDate()+day);//设置日期
	document.cookie=key+'='+encodeURI(value)+';expires='+date;
}
export function  getCookie(key){
    
	var arr=decodeURI(document.cookie).split('; ');
	for(var i=0;i<arr.length;i++){
		var newarr=arr[i].split('=');//1次循环：[username,张三] 2次循环[password,456789]......
		if(key==newarr[0]){
			return newarr[1];
		}
	}
}
export function delCookie(key,value){
	addCookie(key,value,-1);
}
